cmake_minimum_required(VERSION 2.8)

##########################################################
## Step 1 
##1. INCLUDE_DIRECTORES
set(VZPROJECT_INCLUDE_DIR
	${PROJECT_SOURCE_DIR}/src
)

##########################################################
## Step 2 
##2. LIBRARY_DIRECTORES
set(VZPROJECT_LIBRARY_DIR
  ${PROJECT_SOURCE_DIR}/lib/vs2017
)

##########################################################
## Step 3 
##3. LINK_LIBRARIES
set(VZPROJECT_LINK_LIB
  ws2_32.lib
  Winmm.lib
)

##########################################################
## Step 4
add_definitions(
	-D_CRT_SECURE_NO_WARNINGS
	-DUNICODE
)

##########################################################
## Step 5
set(CompilerFlags
		CMAKE_CXX_FLAGS
		CMAKE_CXX_FLAGS_DEBUG
		CMAKE_CXX_FLAGS_RELEASE
		CMAKE_C_FLAGS
		CMAKE_C_FLAGS_DEBUG
		CMAKE_C_FLAGS_RELEASE
		)
#foreach(CompilerFlag ${CompilerFlags})
#  string(REPLACE "/MD" "/MT" ${CompilerFlag} "${${CompilerFlag}}")
#  string(REPLACE "/MDd" "/MTd" ${CompilerFlag} "${${CompilerFlag}}")
#endforeach()

##########################################################
## Step 6
SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY  "${PROJECT_SOURCE_DIR}/bin/vs2017")
SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY  "${PROJECT_SOURCE_DIR}/lib/vs2017")
SET(CMAKE_ARCHIVE_OUTPUT_DIRECTORY  "${PROJECT_SOURCE_DIR}/lib/vs2017")

SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG  "${PROJECT_SOURCE_DIR}/bin/vs2017")
SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY_DEBUG  "${PROJECT_SOURCE_DIR}/lib/vs2017")
SET(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_DEBUG  "${PROJECT_SOURCE_DIR}/lib/vs2017")

# With Release properties
SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE  "${PROJECT_SOURCE_DIR}/bin/vs2017")
SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE  "${PROJECT_SOURCE_DIR}/lib/vs2017")
SET(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_RELEASE  "${PROJECT_SOURCE_DIR}/lib/vs2017")